https://leetcode.cn/problems/binary-tree-inorder-traversal/description/


class Solution {
public:
    vector<int> inorderTraversal(TreeNode* root) {
        vector<int> v;
        stack<TreeNode*> s;
        TreeNode* cur=root;
        while(cur||!s.empty())
        {
            while(cur)
            {    s.push(cur);
                 cur=cur->left;
            }
            TreeNode*top=s.top();
            s.pop();
            v.push_back(top->val);

            cur=top->right;
        }
        return v;
    }
};